import TodoHeader from './components/TodoHeader'
import TodoMain from './components/TodoMain'
import TodoFooter from './components/TodoFooter'
import './styles/base.css'
import './styles/index.css'
import { useEffect } from 'react'
import { useDispatch } from 'react-redux'
import { getList } from './store/actions/todos'
export default function App() {
  const dispatch = useDispatch()

  
  useEffect(() => {
    dispatch(getList())
  }, [dispatch])

  return (
    <div>
      <TodoHeader></TodoHeader>
      <TodoMain></TodoMain>
      <TodoFooter></TodoFooter>
    </div>
  )
}
